package com.vogue.flowmeter.api.event;


import java.io.Serializable;

/**
 *
 * 定义事件====蓝牙外部参数设置事件
 *
 * 所有能被实例化为 Object 的实例都可以作为事件
 * eventbus 3中如果用到了索引加速，事件类的修饰符必须为 public
 */
public class MessageExternalEvent implements Serializable {

    private String operator;
    private String control;
    private String message;
    private String data;
    private String address;
    private String direction;

    public MessageExternalEvent(String message) {
        this.message = message;
    }
    public MessageExternalEvent(String control, String message) {
        this.control = control;
        this.message = message;
    }

    public MessageExternalEvent(String operator, String control, String message) {
        this.operator = operator;
        this.control = control;
        this.message = message;
    }

    public MessageExternalEvent(String operator, String control, String message, String data) {
        this.operator = operator;
        this.control = control;
        this.message = message;
        this.data = data;
    }

    public MessageExternalEvent(String operator, String control, String message, String data, String address) {
        this.operator = operator;
        this.control = control;
        this.message = message;
        this.data = data;
        this.address = address;
    }

    public MessageExternalEvent(String operator, String control, String message, String data, String address, String direction) {
        this.operator = operator;
        this.control = control;
        this.message = message;
        this.data = data;
        this.address = address;
        this.direction = direction;
    }

    public String getOperator() {
        return operator;
    }

    public void setOperator(String operator) {
        this.operator = operator;
    }

    public String getControl() {
        return control;
    }

    public void setControl(String control) {
        this.control = control;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public String getData() {
        return data;
    }

    public void setData(String data) {
        this.data = data;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getDirection() {
        return direction;
    }

    public void setDirection(String direction) {
        this.direction = direction;
    }

    @Override
    public String toString() {
        return "MessageExternalEvent{" +
                "operator='" + operator + '\'' +
                ", control='" + control + '\'' +
                ", message='" + message + '\'' +
                ", data='" + data + '\'' +
                ", address='" + address + '\'' +
                ", direction='" + direction + '\'' +
                '}';
    }
}
